export async function getFromStorage(key) {
  return new Promise((resolve) => {
    chrome.storage.sync.get(key, resolve)
  })
    .then(result => {
      if (key == null) return result
      else return result[key]
    })
}